<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/mainstyle.css"/>
	<link rel="stylesheet" href="./css/themes/base/jquery.ui.all.css">
	<script src="./js/jquery-1.6.2.min.js"></script>
    <script src="./js/calendar/WdatePicker.js"></script>
  <link rel="stylesheet" href="./css/demos.css">
    
    
<title>编辑代理商</title>
<script>
	function trim_all_input()
	{
		var inpus = document.getElementsByTagName("INPUT")
        for(var i=0; i<inpus.length; i++)
        {
            if(inpus[i].type=="text")
            {
               inpus[i].value =  inpus[i].value.replace(/(^/s*)|(/s*$)/g,"");
            }
        }
		
	}
	
	// 提交前检测输入是否合法
	function check(discharge_level,balance)
	{
		trim_all_input(); //所有input 去空格

        if ($('#acctname').val() == '')
		  return false;
        if ($('#password').val() == '')
		  return false;
        if ($('#agent_prefix').val() == '')
		  return false;
		  		 			
	    return true;
		//return true;

	}



	
    </script>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="2%" height="19" valign="bottom"><div align="center"><img src="images/tb.gif" width="14" height="14" /></div></td>
                <td width="98%" valign="bottom"><span class="STYLE10"> 编辑配置代理商</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE1">
              </span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  
 <form name="form1" method="post" action="?action=<% $action %>&id=<% $encode_id %>&curpage=<% $curpage %>">
  <tr>
    <td><table width="1052" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
     
    <tr>
            <td height="18" colspan="2" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">上基本信息</span><span class="STYLE1">            </span></div></td>
            <td height="18" colspan="4" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">IVR设置</span><span class="STYLE1"> </span></div></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">代理名称</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="acctname" id="acctname" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.acctname %>'  disabled />
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">绑定电话数量</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="limitbindtel"  id="limitbindtel" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.limitbindtel %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>/>
              <span class="STYLE1"> 是否修改绑定号码
              <select name="user_edit_bindtel" id="user_edit_bindtel"  >
                <option  value="1" <% if $acct.user_edit_bindtel   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.user_edit_bindtel   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >密码</span></td>
            <td width="24%" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="password"  id="password"  type="password" class="STYLE1" style="height:18px; width:120px;"  value='<% $acct.password %>' size="80" />
            </span></td>
            <td width="13%" height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >IVR语言</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF">
                          <span class="STYLE7">
                <select name="language" id="language"  >
				  <option  value="cn" <% if $acct.language   eq 'select'  %> selected <%/if%> >   选择语言  </option>
                  <option  value="cn" <% if $acct.language   eq 'cn'  %> selected <%/if%> > 中文  </option>
                  <option  value="en" <% if $acct.language   eq 'en'  %> selected <%/if%> > 英文  </option>
				  <option  value="fr" <% if $acct.language   eq 'fr'  %> selected <%/if%> > 法文  </option>
                </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">储值卡前缀</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="agent_prefix"  id="agent_prefix" type="text" class="STYLE1" style="height:18px; width:120px;"  value='<% $acct.agent_prefix %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%> />
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >呼叫等待彩铃</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF">
              <span class="STYLE7">
               <select name="bcall_waitring" id="bcall_waitring"  >
                <option  value="-1"  <% if $acct.bcall_waitring  eq  '-1' %> selected <%/if%> > 不启用 </option>
                <option  value="0"   <% if $acct.bcall_waitring  eq  '0' %> selected <%/if%>  > 系统默认  </option>
                <%foreach from=$musiconholdlist item=eachone key=keyname %>
                <option  value="<% $eachone.id %>" <% if $eachone.id eq $acct.bcall_waitring %> selected <%/if%> >
                  <% $eachone.description %>
                 </option>
                <%/foreach%>
              </select>
                               
                <select name="bcall_waitring_second" id="bcall_waitring_second"  >
                  <option  value="1" <% if $acct.bcall_waitring_second  eq  '1' %> selected <%/if%> > 真实彩铃出现停止   </option>
                  <option  value="0" <% if $acct.bcall_waitring_second  eq   '0' %> selected <%/if%> > 一直使用设置彩铃   </option>
                </select>
              </span></td>
          </tr>
          <tr>
            <td width="14%" height="26" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >余额</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="balance"  id="balance" type="text" class="STYLE1" style="height:18px; width:120px;"  value='<% $acct.balance|string_format:"%.6f" %>' size="30" disabled="disabled" />
              <span class="STYLE1">元</span></span></td>
            <td height="26" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >回铃接通输入被叫</span></td>
            <td height="26" colspan="3" bgcolor="#FFFFFF"><label for="tech"></label>
             <span class="STYLE7">
                <input name="cbinputcount"  id="cbinputcount" type="text" class="STYLE1" style="height:18px; width:40px;"  value='<% $acct.cbinputcount %>' size="30" />
                <span class="STYLE1">次后自动挂机</span></span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">透支金额</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="overbalance"  id="overbalance" type="text" class="STYLE1" style="height:18px; width:120px;"  value='<% $acct.overbalance|string_format:"%.2f" %>' size="30"  <%if $res_acct.id eq $acct.id %>disabled<%/if%> />
              <span class="STYLE1">元</span></span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >回铃接通后按*键</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="cbdtmfhangup" id="cbdtmfhangup"  >
                <option  value="0" <% if $acct.cbdtmfhangup   eq '0'  %> selected <%/if%> > 不启用该按键 </option>
                <option  value="1" <% if $acct.cbdtmfhangup   eq '1'  %> selected <%/if%> > 挂断呼叫 </option>
                <option  value="2" <% if $acct.cbdtmfhangup   eq '2'  %> selected <%/if%> > 进入IVR流程 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">短信余额</span></td>
            <td bgcolor="#FFFFFF"><input name="smsbalance"  id="smsbalance" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.smsbalance|string_format:"%.4f" %>' size="30" disabled="disabled" />
            <span class="STYLE1">元</span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >半直拨接通方式</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF">
              <select name="cbacall_bacll" id="cbacall_bacll"  >
                <option  value="1" <% if $acct.cbacall_bacll   eq '1'  %> selected <%/if%> > 主叫和被叫同时接通 </option>
                <option  value="0" <% if $acct.cbacall_bacll   eq '0'  %> selected <%/if%> > 先接通主叫后在呼叫被叫 </option>
              </select>           </td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF" class="STYLE1">可操作金额</td>
            <td bgcolor="#FFFFFF">
			<input name="paybalance"  id="paybalance" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.paybalance|string_format:"%.4f" %>' size="30"  disabled="disabled" />
            <span class="STYLE1">元</span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">回拨被叫接通后计费</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="acall_bill_flag" id="acall_bill_flag"  >
                <option  value="1" <% if $acct.acall_bill_flag   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.acall_bill_flag   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>

          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF" class="STYLE1">传真套餐</td>
            <td bgcolor="#FFFFFF"> <select name="fax_ratepage_id" id="fax_ratepage_id"  <%if $res_acct.id eq $acct.id %>disabled<%/if%>>
                <%foreach from=$faxratepages item=eachone key=keyname %>
                <option  value="<% $eachone.decode_id %>"  <% if $eachone.id eq $acct.fax_ratepage_id %> selected <%/if%> >
                <% $eachone.name %>
                </option>
                <%/foreach%>
              </select></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">回铃接通</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="acallbillcount"  id="acallbillcount" type="text" class="STYLE1" style="height:18px; width:30px;"  value='<% $acct.acallbillcount %>' size="30" />
次不电话扣费
<input name="acallbillbalance"  id="acallbillbalance" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.acallbillbalance|string_format:"%.2f" %>' size="30" />
元</span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >回拨路由组</span></td>
            <td bgcolor="#FFFFFF">
              <span class="STYLE7">
                <select name="gatewaygroupid_acall" id="gatewaygroupid_acall"   <%if $res_acct.id eq $acct.id %>disabled<%/if%> >
                  <%foreach from=$routegroups_acall item=eachone key=keyname %>
                  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.gatewaygroupid_acall  %> selected <%/if%> >
                    <% $eachone.gatewaygroupname %>
                  </option>
                  <%/foreach%>
              </select>
              </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >直拨、回拨呼叫报分钟</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="playtimelong" id="playtimelong"  >
                <option  value="1" <% if $acct.playtimelong   eq '1'  %> selected <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.playtimelong   eq '0'  %> selected <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >被叫路由组</span></td>
            <td bgcolor="#FFFFFF">
              <span class="STYLE7">
                <select name="gatewaygroupid" id="gatewaygroupid"   <%if $res_acct.id eq $acct.id %>disabled<%/if%> >
                  <%foreach from=$routegroups item=eachone key=keyname %>
                  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.gatewaygroupid %> selected <%/if%> >
                    <% $eachone.gatewaygroupname %>
                  </option>
                  <%/foreach%>
              </select>
              </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >中继预约报余额</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="trunk_playbanlce" id="trunk_playbanlce"  >
                <option  value="1" <% if $acct.trunk_playbanlce   eq '1'  %> selected <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.trunk_playbanlce   eq '0'  %> selected <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >回拨费率组</span></td>
            <td bgcolor="#FFFFFF">
              <span class="STYLE7">
                <select name="rategroupid_acall" id="rategroupid_acall"  <%if $res_acct.id eq $acct.id %>disabled<%/if%> >
                  <%foreach from=$rategroups_acall item=eachone key=keyname %>
                  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.rategroupid_acall  %> selected <%/if%> >
                    <% $eachone.rategroupname %>
                  </option>
                  <%/foreach%>
              </select>
              </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >回拨回铃报余额</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="callback_playbanlce" id="callback_playbanlce"  >
                <option  value="1" <% if $acct.callback_playbanlce   eq '1'  %> selected <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.callback_playbanlce   eq '0'  %> selected <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >被叫费率组</span></td>
            <td bgcolor="#FFFFFF">
              <span class="STYLE7">
                <select name="rategroupid" id="rategroupid"    <%if $res_acct.id eq $acct.id %>disabled<%/if%>>
                  <%foreach from=$rategroups item=eachone key=keyname %>
                  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.rategroupid %> selected <%/if%> >
                    <% $eachone.rategroupname %>
                  </option>
                  <%/foreach%>
              </select>
              </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span   class="STYLE1" >通话结束后报余额</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="billend_playbanlce" id="billend_playbanlce"  >
                <option  value="1" <% if $acct.billend_playbanlce   eq '1'  %> selected <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.billend_playbanlce   eq '0'  %> selected <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td rowspan="8" bgcolor="#FFFFFF"><span class="STYLE7">
              <select style="width:250px" size="5" multiple="multiple" name="ratepackages[]"  <%if $res_acct.id eq $acct.id    %>disabled<%/if%>>
                <option value="-1">---------不使用套餐---------</option>
                <%foreach from=$ratepackages_array item=eachone key=keyname %>
                <option value="<% $eachone.id %>"
                    <%foreach from=$ratepackages item=eachone1 key=keyname %> 
                     <% if $eachone1.ratepackage_id eq $eachone.id %>selected<%/if%>
                    <%/foreach%>  >
                  <% $eachone.packagename %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">中继预约语音</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="callback_submit_bye" id="callback_submit_bye"  >
                <option  value="-2" <% if $acct.callback_submit_bye   eq '-2'  %> selected="selected" <%/if%> > 不播放 </option>
				<option  value="-1" <% if $acct.callback_submit_bye   eq '-1'  %> selected="selected" <%/if%> > 系统默认 </option>
                <% foreach from=$wav_list item=eachone key=keyname %>
                <option value="<% $eachone.id %>" <%if $eachone.id eq $acct.callback_submit_bye   %>selected<%/if%>  >
                <% $eachone.description %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">半直拨预约输入号码语音</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="callback_submit_input" id="callback_submit_input"  >
                <option  value="-1" <% if $acct.callback_submit_input   eq '-1'  %> selected="selected" <%/if%> > 系统默认 </option>
                <% foreach from=$wav_list item=eachone key=keyname %>
                <option value="<% $eachone.id %>" <%if $eachone.id eq $acct.callback_submit_input   %>selected<%/if%>  >
                <% $eachone.description %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">套餐</span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">回铃输入号码语音</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="playwelecome" id="playwelecome"  >
                <option  value="-1" <% if $acct.playwelecome   eq '-1'  %> selected="selected" <%/if%> > 系统默认 </option>
                <% foreach from=$wav_list item=eachone key=keyname %>
                <option value="<% $eachone.id %>" <%if $eachone.id eq $acct.playwelecome   %>selected<%/if%>  >
                  <% $eachone.description %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">直拨输入号码语音</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="derect_submit_input" id="derect_submit_input"  >
                <option  value="-1" <% if $acct.derect_submit_input   eq '-1'  %> selected="selected" <%/if%> > 系统默认 </option>
                <% foreach from=$wav_list item=eachone key=keyname %>
                <option value="<% $eachone.id %>" <%if $eachone.id eq $acct.derect_submit_input   %>selected<%/if%>  >
                <% $eachone.description %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">直拨输入号码位数</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="derect_input_len"  id="derect_input_len" type="text" class="STYLE1" style="height:18px; width:80px;"  value='<% $acct.derect_input_len %>' size="30" />
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">呼叫被叫等待时长</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="waitring_timelong"  id="waitring_timelong" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.waitring_timelong %>' size="30" />
秒</span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">半直拨预约被叫位数</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7"><span class="STYLE1">
              <input name="abcall_dest_len"  id="abcall_dest_len" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.abcall_dest_len %>' size="30" />
(0表示不限制)</span></span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">每次通话最大时长</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="maxcall_timelong"  id="maxcall_timelong" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.maxcall_timelong %>' size="30" />
            秒 </span></td>
          </tr>

          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1"><span class="STYLE4">CC外呼任务并发</span></span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="curmaxcall"  id="curmaxcall" type="text" class="STYLE1" style="height:18px; width:60px;"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>  value='<% $acct.curmaxcall %>' size="30" />
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">自动禁用</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1"><span class="STYLE7">
              <select name="off_state" id="off_state"  >
                <option  value="1" <% if $acct.off_state   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.off_state   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span>开始</span>
              <input type="text" name="off_begintime" id="off_begintime" class="Wdate"  readonly="readonly"  style="height:18px; width:80px;"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'HH:mm:ss'})" value='<% $acct.off_begintime %>'/>
-<span class="STYLE1">结束</span>
<input type="text"  name="off_endtime" id="off_endtime" class="Wdate"  readonly="readonly"  style="height:18px; width:80px;"  onfocus="WdatePicker({skin:'whyGreen',dateFmt:'HH:mm:ss'})" value='<% $acct.off_endtime %>'/></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">禁呼叫号码池</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="forbidcallee_id" id="forbidcallee_id"   <%if $res_acct.accttype neq '1' %>disabled<%/if%>>
                <option  value="-1" > 不启用 </option>
                <%foreach from=$callergroups item=eachone key=keyname %>
                <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.forbidcallee_id %> selected="selected" <%/if%> >
                <% $eachone.callergroup_name %>
                </option>
                <%/foreach%>
              </select>
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">被叫手机号加区号</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="addcitycode" class="STYLE1" id="addcitycode"  >
                <option  value="1" <% if $acct.addcitycode   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.addcitycode   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">CC建立客服数</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="limit_user_count"  id="limit_user_count" type="text" class="STYLE1" style="height:18px; width:60px;"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>  value='<% $acct.limit_user_count %>' size="30" />
个</span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">区号</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="citycode" id="citycode" type="text" class="STYLE1" style="height:18px; width:220px;" size="30"  value='<% $acct.citycode %>' />
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">忙时时段</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="buy_hour_start" class="STYLE1" id="buy_hour_start"  >
                <%foreach from=$hours item=eachone key=keyname %>
                <option  value="<% $eachone.value %>" <% if $eachone.value eq $acct.buy_hour_start %> selected="selected" <%/if%> >
                <% $eachone.name %>
                </option>
                <%/foreach%>
              </select>
            </span>-<span class="STYLE7">
            <select name="buy_hour_end" class="STYLE1" id="buy_hour_end"  >
              <%foreach from=$hours item=eachone key=keyname %>
              <option  value="<% $eachone.value %>" <% if $eachone.value eq $acct.buy_hour_end %> selected="selected" <%/if%> >
              <% $eachone.name %>
              </option>
              <%/foreach%>
            </select>
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">(0371,010,020
            代表 郑州,北京,广州地区的手机自动加区号)</span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">一号通激活数</span></td>
            <td bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="active_user_count"  id="active_user_count" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.active_user_count %>' size="30" />
            </span></td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">充值卡充值用户过期余额清空</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <select name="expiredinitbalance" id="expiredinitbalance"  >
                <option  value="1" <% if $acct.expiredinitbalance   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.expiredinitbalance   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="18" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" align="right" bgcolor="#FFFFFF"><span class="STYLE1">充值卡充值累加有效期</span></td>
            <td height="18" colspan="3" bgcolor="#FFFFFF"><span class="STYLE1">
              <select name="user_expiredday_add" id="user_expiredday_add"  >
                <option  value="1" <% if $acct.user_expiredday_add   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.user_expiredday_add   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
 
   
          
		  <% if $res_acct.accttype eq '1' %>
          <tr>
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">自动注册密匙</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="air_bindmd5"  id="air_bindmd5" type="text" class="STYLE1" style="height:18px; width:240px;"  value='<% $acct.air_bindmd5 %>' size="30" />
            </span></td>
          </tr>
          <tr>
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">自动注册费率组</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">回铃费率组
                <select name="air_rategroupid_acall" id="air_rategroupid_acall"  >
                  <%foreach from=$user_rategroups item=eachone key=keyname %>
                  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.air_rategroupid_acall  %> selected="selected" <%/if%> >
                  <% $eachone.rategroupname %>
                  </option>
                  <%/foreach%>
                </select>
被叫费率组
<select name="air_rategroupid" id="air_rategroupid"  >
  <%foreach from=$user_rategroups item=eachone key=keyname %>
  <option  value="<% $eachone.decode_id %>" <% if $eachone.id eq $acct.air_rategroupid %> selected="selected" <%/if%> >
  <% $eachone.rategroupname %>
  </option>
  <%/foreach%>
</select>
&nbsp;  &nbsp;注册赠送
<input name="air_gift"  id="air_gift" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.air_gift|string_format:"%.2f" %>' size="30" />
元    &nbsp;  &nbsp;注册赠送
<input name="air_gif_per"  id="air_gif_per" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.air_gif_per %>' size="30" />
分钟 推荐赠送
<input name="recommendbalance"  id="recommendbalance" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.recommendbalance|string_format:"%.2f" %>' size="30" />
元 有效期
<input name="air_expireddays"  id="air_expireddays" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.air_expireddays %>' size="30" />
天</span></td>
          </tr>
          <tr>
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">储值卡面值(有效期)</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="card_balance_day" id="card_balance_day" type="text"  style="height:18px; width:420px;" size="140"  value='<% $acct.card_balance_day %>' />
              <span class="STYLE4">格式:面值+赠送(有效期) 30+0(30);100+0(60)</span></span></td>
          </tr>        
       
	   <%/if%>
	   
        <% if $res_acct.accttype eq '1' or  $acct.sms_level eq '1' %>
          <tr>
            <td height="24" colspan="6" align="right" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="24" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE4">短信提醒设置</span><span class="STYLE1"> </span></div></td>
          </tr>
          <tr>
            <td height="19" align="right" bgcolor="#FFFFFF"><span class="STYLE4">充值提醒开关</span></td>
            <td height="19" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="recharge_smshit" id="recharge_smshit"  >
                <option  value="1" <% if $acct.recharge_smshit   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.recharge_smshit   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr>
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">短信通道网址</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="smsurl" id="smsurl" type="text" class="STYLE1" style="height:18px; width:480px;"   value='<% $acct.smsurl %>' />
            短信编码
            <select name="smscharset" id="smscharset"  >
              <option  value="GB2312" <% if $acct.smscharset   eq 'GB2312'  %> selected="selected" <%/if%> > GB2312 </option>
              <option  value="UTF-8"  <% if $acct.smscharset   eq 'UTF-8'  %> selected="selected" <%/if%> > UTF-8 </option>
            </select>
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">短信内容</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="smsmsg" id="smsmsg" type="text"  style="height:18px; width:620px;" size="140"  value='<% $acct.smsmsg %>' />
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">格式</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">电话字段在前，短信内容字段在后，分别用%s表示<span class="STYLE4"> http://***/send.asp?USERNAME=****&amp;PASSWORD=****&amp;MOBILE=%s&amp;CONTENT=%s</span></span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE21">尊敬的客户：您已成功充值%s元 余额%s元 感谢您的使用！客户热线10010</span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1"><span class="STYLE21">发送测试</span></span><span class="STYLE21">手机号码</span><span class="STYLE1">
                <input name="sendsmstel" id="sendsmstel" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='' />
                <input  type="button"  class="STYLE1"   name="button22" id="button22"   onclick="sendtestsms('<% $encode_id %>')" value=" 发 送 " />
                        </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">推荐赠送提醒</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="recommend_smsmsg_flag" id="recommend_smsmsg_flag"  >
                <option  value="1" <% if $acct.recommend_smsmsg_flag   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.recommend_smsmsg_flag   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">短信内容</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="recommend_smsmsg" id="recommend_smsmsg" type="text"  style="height:18px; width:620px;" size="140"  value='<% $acct.recommend_smsmsg %>' />
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE21">尊敬的客户：您推荐的用户成功充值！您将得到%s元话费的奖励！</span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">亲情号短信提醒</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="btob_smsmsg_flag" id="btob_smsmsg_flag"  >
                <option  value="1" <% if $acct.btob_smsmsg_flag   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
                <option  value="0" <% if $acct.btob_smsmsg_flag   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">短信内容</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="btob_smsmsg" id="btob_smsmsg" type="text"  style="height:18px; width:620px;" size="140"  value='<% $acct.btob_smsmsg %>' />
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE21">亲爱的用户,已为您加入亲情拔号,您的亲情号码是:%s,您可以直接拔打该号码来联系您的朋友:%s</span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">被叫广告提醒</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <select name="bcall_smsmsg_flag" id="bcall_smsmsg_flag"  >
			     
                
                
				<option  value="1" <% if $acct.bcall_smsmsg_flag   eq '1'  %> selected="selected" <%/if%> > 系统未绑定号码 </option>
				<option  value="2" <% if $acct.bcall_smsmsg_flag   eq '2'  %> selected="selected" <%/if%> > 所有号码 </option>
				<option  value="0" <% if $acct.bcall_smsmsg_flag   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
              </select>
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">短信内容</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="bcall_smsmsg" id="bcall_smsmsg" type="text"  style="height:18px; width:620px;" size="140"  value='<% $acct.bcall_smsmsg %>' />
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          
		  
		  		<% if $res_acct.accttype eq '1' %>
                
                <tr >
                  <td height="24" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE4">个人信息</span></div></td>
                </tr>
                <tr >
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">所属区域</span></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="areacode" id="areacode" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.areacode %>' />
                  </span></div></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">职位</span></td>
                  <td width="12%" height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="businesslicense" id="businesslicense" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.businesslicense %>' />
                  </span></div></td>
                  <td width="8%" height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">联系电话</span></td>
                  <td width="29%" height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="tel" id="tel" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.tel %>' />
                  </span></div></td>
                </tr>
                <tr >
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">所属部门</span></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="position" id="position" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.position %>' />
                  </span></div></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">姓名</span></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="chinesename" id="chinesename" type="text" class="STYLE1" style="height:18px; width:120px;" size="30"  value='<% $acct.chinesename %>' />
                  </span></div></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">电子邮件</span></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="email" id="email" type="text" class="STYLE1" style="height:18px; width:220px;" size="30"  value='<% $acct.email %>' />
                  </span></div></td>
                </tr>
                <tr >
                  <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">银行卡号</span></td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"><span class="STYLE7">
                    <input name="idcard" id="idcard" type="text" class="STYLE1" style="height:18px; width:220px;" size="30"  value='<% $acct.idcard %>' />
                  </span></div></td>
                  <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"></div></td>
                  <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
                  <td height="24" align="right" bgcolor="#FFFFFF"><div align="left"></div></td>
                </tr>
                <tr >
                  <td height="24" colspan="6" align="right" bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
          <tr >
            <td height="24" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE4">接口呼叫</span></div></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">API接口呼叫</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><select name="httpgateway_flag" id="httpgateway_flag"  >
              <option  value="1" <% if $acct.httpgateway_flag   eq '1'  %> selected="selected" <%/if%> > 开启 </option>
              <option  value="0" <% if $acct.httpgateway_flag   eq '0'  %> selected="selected" <%/if%> > 关闭 </option>
            </select></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">接口</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE7">
              <input name="httpcall_url" id="httpcall_url" type="text"  style="height:18px; width:620px;"   value='<% $acct.httpcall_url %>' />
            </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">http://ip:port/call.php?主叫=</span><span class="STYLE4">[caller]</span><span class="STYLE1">&amp;被叫=</span><span class="STYLE4">[callee]</span><span class="STYLE1">&amp;时长=</span><span class="STYLE4">[plantime]</span><span class="STYLE1">&amp;name=账号&amp;pwd=密码 备注:<span class="STYLE4">[caller]</span> 主叫参数 <span class="STYLE4">[callee]</span>被叫参数 <span class="STYLE4">[plantime]</span>通话时长</span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">启动并发</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="httpcall_max_line"  id="httpcall_max_line" type="text" class="STYLE1" style="height:18px; width:60px;"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>  value='<% $acct.httpcall_max_line %>' size="50" />
            线</span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">拨号前缀</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="httpcall_prefix"  id="httpcall_prefix" type="text" class="STYLE1" style="height:18px; width:240px;"  value='<% $acct.httpcall_prefix %>' />
            多个前缀可以用 小逗号分开 比如: 0,1,138 </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE4">替换规则</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="httpcall_prefix_replace"  id="httpcall_prefix_replace" type="text" class="STYLE1" style="height:18px; width:440px;"  value='<% $acct.httpcall_prefix_replace %>' />
            多个前缀可以用 小分号分开 比如: 61&gt;1;81&gt;1 </span></td>
          </tr>
          <tr >
            <td height="24" align="right" bgcolor="#FFFFFF"><span class="STYLE1">IP地址</span></td>
            <td height="24" colspan="5" bgcolor="#FFFFFF"><span class="STYLE1">
              <input name="httpcall_ip"  id="httpcall_ip" type="text" class="STYLE1" style="height:18px; width:240px;"  value='<% $acct.httpcall_ip %>' size="30" />
              计费单位
              <input name="httpcall_payunitsecond"  id="httpcall_payunitsecond" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.httpcall_payunitsecond %>' size="30" />
            秒 单价
            <input name="httpcall_price"  id="httpcall_price" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.httpcall_price %>' size="30" />
            元（仅用于统计)</span></td>
          </tr>
 	 <%/if%>  
        <%/if%></table>
      <table width="1052" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce"><tr></tr></table>
          <table width="1052" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce"><tr></tr>
         
          <tr>
            <td height="18" colspan="6" align="right" bgcolor="#FFFFFF" class="ui-accordion-header-active"><div align="center"><span class="STYLE1">权限设置</span></div></td>
          </tr>
          <tr>
            <td height="18" colspan="6" align="right" bgcolor="#FFFFFF" class="ui-accordion-header-active"><div align="center">
              <input name="callerid_type" type="checkbox" class="STYLE1" id="callerid_type"  <% if $res_acct.id eq  $acct.id %> disabled <%/if%> <% if $res_acct.accttype eq '2' %><% if $res_acct.callerid_type neq '1' %> disabled<%/if%><%/if%>   <% if $acct.callerid_type eq '1' %> checked<%/if%>>
              <label for="callerid_type" class="STYLE1">改主叫号码</label>
              <input name="newuser_level" type="checkbox" class="STYLE1" id="newuser_level"    <% if $res_acct.id eq  $acct.id %>  disabled<% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.newuser_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.newuser_level eq '1' %> checked <%/if%> >
              <label for="newuser_level" class="STYLE1">创建用户</label>
              <input name="newcard_level" type="checkbox" class="STYLE1" id="newcard_level"  <% if $res_acct.id eq  $acct.id %>  disabled <% /if %> <% if $res_acct.accttype eq '2' %><% if $res_acct.newcard_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.newcard_level eq '1' %> checked <%/if%> >
              <label for="newcard_level" class="STYLE1">创建储值卡</label>
              <input name="update_level" type="checkbox" class="STYLE1" id="update_level"   <% if $res_acct.id eq  $acct.id %>  disabled <% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.update_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.update_level eq '1' %> checked <%/if%>  >
              <label for="update_level" class="STYLE1">批量修改</label>

              <input name="voicefile_level" type="checkbox" class="STYLE1" id="voicefile_level"   <% if $res_acct.id eq  $acct.id %>  disabled <% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.voicefile_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.voicefile_level eq '1' %> checked <%/if%>  >
              <label for="voicefile_level" class="STYLE1">文件自动审核</label>
              
                   <input name="sms_level" type="checkbox" class="STYLE1" id="sms_level"   <% if $res_acct.id eq  $acct.id %>  disabled <% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.sms_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.sms_level eq '1' %> checked <%/if%>  >
              <label for="sms_level" class="STYLE1">短信通道</label>
			  
			                    <input name="listuser_level" type="checkbox" class="STYLE1" id="listuser_level"   <% if $res_acct.id eq  $acct.id %>  disabled <% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.listuser_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.listuser_level eq '1' %> checked <%/if%>  >
              <label for="listuser_level" class="STYLE1">面值查看用户</label> 
            </div></td>
          </tr>
        
          <tr>
            <td height="18" colspan="6" align="right" bgcolor="#FFFFFF" class="ui-accordion-header-active"><div align="center">
              <input name="agents_have" type="checkbox" class="STYLE1" id="agents_have"    <% if $res_acct.id eq  $acct.id %>  disabled <% /if %> <% if $res_acct.accttype eq '2' %><% if $res_acct.agents_have neq '1' %> disabled<%/if%><%/if%> <% if $acct.agents_have eq '1' %> checked <%/if%> >
              <label for="agents_have" class="STYLE1">建下级代理</label>
              <input name="downloaduser_level" type="checkbox" class="STYLE1" id="downloaduser_level"  <% if $res_acct.id eq  $acct.id %>  disabled <% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.downloaduser_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.downloaduser_level eq '1' %> checked <%/if%> >
              <label for="downloaduser_level" class="STYLE1">导出用户</label>
              <input name="downloadcard_level" type="checkbox" class="STYLE1" id="downloadcard_level"  <% if $res_acct.id eq  $acct.id %>  disabled<% /if %><% if $res_acct.accttype eq '2' %><% if $res_acct.downloadcard_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.downloadcard_level eq '1' %> checked <%/if%> >
              <label for="downloadcard_level" class="STYLE1">导出储值卡</label>
              <input name="rate_level" type="checkbox" class="STYLE1" id="rate_level"  <% if $res_acct.id eq  $acct.id %>  disabled <% /if %> <% if $res_acct.accttype eq '2' %><% if $res_acct.rate_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.rate_level eq '1' %> checked <%/if%>  >
              <label for="rate_level" class="STYLE1">用户费率</label>
              <input name="callinglist_level" type="checkbox" class="STYLE1" id="callinglist_level"  <% if $res_acct.id eq  $acct.id %>  disabled <% /if %>   <% if $res_acct.accttype eq '2' %><% if $res_acct.callinglist_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.callinglist_level eq '1' %> checked <%/if%> />
              <span class="STYLE1">监控线路呼叫</span> 
              

  <input name="vocrecord_level" type="checkbox" class="STYLE1" id="vocrecord_level"  <% if $res_acct.id eq  $acct.id %>  disabled <% /if %>   <% if $res_acct.accttype eq '2' %><% if $res_acct.vocrecord_level neq '1' %> disabled<%/if%><%/if%> <% if $acct.vocrecord_level eq '1' %> checked <%/if%> />
              <span class="STYLE1">坐席录音</span> 
			  
  <input name="user_set_balance" type="checkbox" class="STYLE1" id="user_set_balance"   <% if $res_acct.id eq  $acct.id %>  disabled <% /if %> <% if $res_acct.accttype eq '2' %><% if $res_acct.user_set_balance neq '1' %> disabled<%/if%><%/if%> <% if $acct.user_set_balance eq '1' %> checked <%/if%> />
              <label for="user_set_balance" class="STYLE1">允许现金充值</label>
</div></td>
          </tr>
<% if $res_acct.accttype eq '1' %>     
          <tr>
            <td height="18" colspan="6" align="right" bgcolor="#FFFFFF" class="ui-accordion-header-active"><div align="center"><span class="STYLE1">通话赠送设置</span></div>              
            <div align="center"></div></td>
          </tr>
          <tr>
            <td height="25" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">易宝支付赠送百分比<span class="STYLE7">
              <input name="yeepay_gifper"  id="yeepay_gifper" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.yeepay_gifper %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>/>
            </span>%</span></div></td
          >
          </tr>
          <tr>
            <td height="25" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">1：通话</span><span class="STYLE1">
              <input name="gift_timelevel1"  id="gift_timelevel1" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelevel1 %>' size="30" />
              </span><span class="STYLE1">秒后加 </span><span class="STYLE1">
                <input name="gift_timelong1"  id="gift_timelong1" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelong1 %>' size="30" />
              </span><span class="STYLE1">秒</span> <span class="STYLE1">2：通话</span><span class="STYLE1">
              <input name="gift_timelevel2"  id="gift_timelevel2" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelevel2 %>' size="30" />
              </span><span class="STYLE1">秒后加 </span><span class="STYLE1">
              <input name="gift_timelong2"  id="gift_timelong2" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelong2 %>' size="30" />
              </span><span class="STYLE1">秒</span> <span class="STYLE1">3：通话</span><span class="STYLE1">
              <input name="gift_timelevel3"  id="gift_timelevel3" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelevel3 %>' size="30" />
              </span><span class="STYLE1">秒后加 </span><span class="STYLE1">
              <input name="gift_timelong3"  id="gift_timelong3" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.gift_timelong3 %>' size="30" />
              </span><span class="STYLE1">秒</span></div></td
          ></tr>
          <tr>
            <td height="25" colspan="6" align="right" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">话单分钟单位</span><span class="STYLE7">
            <input name="minute_len"  id="minute_len" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.minute_len %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%> />
            <span class="STYLE1">秒</span></span> <span class="STYLE1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;修正时间</span><span class="STYLE7">
            <input name="timepercent"  id="timepercent" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.timepercent %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>/>
            </span><span class="STYLE1">%</span> <span class="STYLE1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;昨天话单修正</span><span class="STYLE7">
            <input name="updatecdr_per"  id="updatecdr_per" type="text" class="STYLE1" style="height:18px; width:60px;"  value='<% $acct.updatecdr_per %>' size="30"  <%if $res_acct.accttype neq '1' %>disabled<%/if%>/>
            </span><span class="STYLE1">%</span></div></td>
          </tr>
  <%/if%>
          <tr>
            <td height="18" colspan="6" align="center" bgcolor="#FFFFFF">
              
              <input type="submit"  class="STYLE1"   name="submitbtn" id="submitbtn"   onClick="return check()" value=" 确认提交 ">
              <input  type="button"  class="STYLE1"   name="backbutton" id="backbutton"   onClick="goback('<% $curpage %>')" value=" 取消返回 "> </td>
          </tr>
     
    </table></td>
  </tr>
  </form>

  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       
        <td width="67%"><table width="312" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>

            <td width="35">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

</body>
<script>

	function goback(curpage)
	{
	    document.form1.action = '?action=list&curpage='+curpage;
		document.form1.submit();
	}
	
	function sendtestsms(varid)
	{
	
	   if ($('#sendsmstel').val() != '')
	   {
		   var vartel = $('#sendsmstel').val();
		
		    alert ('开始给电话' + vartel +'发送测试短信');
			  $.get("agents.php?action=send_sms",{sendsmstel :vartel,id:varid}, function(data){ 
						  if (data == '0')  alert ('提交发送测试短信成功');
						  else alert (data);
		  });	   
		}
	   else
	   {
	      alert ('请输入您发送测试的电话号码');
	   }


	   

						
	}
				
		 $("input:text,input:password,textarea").focus(function(){
			 if (this.value == '请输入') this.value = '';
			 $(this).css("background","#a8c7ce");
			 }).blur(function(){
				 if (this.id == 'agent_prefix'  )
				 {
					 var info = ''; 
					 var agent_prefix = $.trim(this.value) ;
					 if (agent_prefix == '')
					 { 
					      info ='<font color="#FF0000">'+'请输入完整储值卡前缀</font>';
						  $('#div_trips').html(info);
						  $(this).focus;
						  $(this).css("background","#CBFE9F");
					 }
					 else
					 {
					 }
				 }

				 $(this).css("background","#FFF");
				 
				
			 }); 
</script>    

</html>
